# To build the Docker image, run:
# docker build -f RPM.Dockerfile -t version_verifier_rpm .

FROM centos:8

# Update repositories
RUN sed -i -e "s|mirrorlist=|#mirrorlist=|g" /etc/yum.repos.d/CentOS-*
RUN sed -i -e "s|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g" /etc/yum.repos.d/CentOS-*
RUN yum -y update

# Install rpmdevtools
RUN yum -y install rpmdevtools

# Set the working directory
WORKDIR /usr/local/bin/version_verifier

# Copy the version verifier script
COPY version_verifier.sh .

# Make the script executable
RUN chmod +x version_verifier.sh

# Set the entry point
CMD ["/usr/local/bin/version_verifier/version_verifier.sh"]
